package com.fxkj.cloud.drms.domain.alarm.repository;

import com.fxkj.cloud.drms.domain.alarm.AlarmHistoryDomain;
import com.fxkj.cloud.drms.domain.alarm.AlarmStatistics;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;
import java.util.UUID;

/**
 * <p>description: </p>
 * @author ww
 * @date 2025/4/7 15:30
 */
public interface AlarmHistoryDomainRepository {

    Page<AlarmHistoryDomain> list(Pageable pageable, UUID deviceId, UUID productId, UUID orgId, Integer alarmLevel, Long startTs, Long endTs, String alarmText,Boolean closed);

    void save(AlarmHistoryDomain alarmHistoryDomain);

    void saveAll(List<AlarmHistoryDomain> alarmHistoryDomains);

    List<AlarmHistoryDomain> findByDeviceSerialNoAndCodeAndClose(String deviceSerialNo, String code, Boolean close);

    List<AlarmStatistics> productAlarmStatistics(Set<UUID> productIds);
}
